GetCodecNameList
TheGetCodecNameList
function allows your application to retrieve a list of installed compressor components or a list of installed compressor types. This information may be useful when the user selects a compression type for a given image or sequence.
pascal OSErr GetCodecNameList (CodecNameSpecListPtr *list, short showAll);
list
- Contains a pointer to a field that is to receive a pointer to the compressor name list structure. The Image Compression Manager creates the appropriate list and returns a pointer to that list in the field specified by the
list
parameter. Note that theGetCodecNameList
function creates this list in your application's current heap zone.showAll
- Specifies a short integer that controls the contents of the list. Set this parameter to 1 to receive a list of the names of all installed compressor components--the returned list contains one entry for each installed compressor. Set this parameter to 0 to receive a list of the types of installed compressor components--the returned list contains one entry for each installed compressor type. See "The Compressor Name List Structure" on page 3-51 for a complete description of the contents of the returned list.
DESCRIPTION
The Image Compression Manager returns this information in a compressor name list structure, which contains an array of compressor name structures and a field indicating the number of structures in the array.The
CodecType
data type defines a field in the compressor name list structure that identifies the compression method employed by a given compressor component. Apple Computer's Developer Technical Support group assigns these values so that they remain unique. These values correspond, in turn, to text strings that can identify the compression method to the user.
typedef long CodecType; /* compressor type descriptor--for example 'jpeg','rle ', 'rpza' */Currently, sixCodecType
values are provided by Apple. You should use theGetCodecNameList
function to retrieve these names, so that your application can take advantage of new compressor types that may be added in the future. For eachCodecType
value in the following list, the corresponding compression method is also identified by its text string name. For more information about each of these compression techniques, see the section "About Image Compression," which begins on page 3-8.SPECIAL CONSIDERATIONS
Note that the Image Compression Manager returns the list in your application's current heap zone. Use theDisposeCodecNameList
function, described in the next section, to release this memory when your program is finished with the list.RESULT CODES
Component Manager errors
noErr 0 No error paramErr -50 Invalid parameter specified
Memory Manager errors